#pragma once

struct Rect 
{
	int topLeftX;
	int topLeftY;
	int bottomRightX;
	int bottomRightY;

	const Rect& operator=(const Rect& rhs)
	{
		topLeftX = rhs.topLeftX;
		topLeftY = rhs.topLeftY;
		bottomRightX = rhs.bottomRightX;
		bottomRightY = rhs.bottomRightY;

		return (*this);
	}

	bool isInRect(int x, int y) const
	{
		return ((x>=topLeftX&&x<=bottomRightX)&&(y>=topLeftY&&y<=bottomRightY));
	}
};